package java06;
import java.util.Arrays;
public class ArraysTest02 {
    public static void main(String[] args){
        int[] arr = {9,8,3,5,2};
        Arrays.sort(arr);
        int index = Arrays.binarySearch(arr,3);//查找指定元素3
        System.out.println("元素3的索引是：" + index);
    }
}
